package com.gopay.webtest.handler.citicSign;

/**
 * 中信银行签名
 * @AlgorithmEnum.java
 * @author dong-wang5@hnari.com
 * @2016年6月16日 下午4:28:10  www.gopay.com.cn Inc.All rights reserved.
 */
public enum AlgorithmEnum {
    AES("AES","aes对称加解密算法"),

    RSA("RSA","rsa非对称加解密算法");

    private final String code;

    private final String message;

    AlgorithmEnum(String code,String message){
        this.code = code;
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }

    public static AlgorithmEnum getEnumByCode(String code){
        if (code ==null || "".equals(code)){
            return  null;
        }
        for (AlgorithmEnum each : values()){
            if (code.equalsIgnoreCase(each.getCode())){
                return each;
            }
        }
        return null;
    }
}
